package com.guigu.userservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.guigu.userservice.dto.Equipment;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 业务员设备关联表
 * </p>
 *
 * @author zcy
 * @since 2025-09-28
 */
@Data
@TableName("businessman_equipment")
public class BusinessmanEquipment {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @TableField(value = "businessman_id")
    private Integer businessmanId;
    @TableField(value = "equipment_id")
    private Integer equipmentId;
    @TableField(value = "responsibility_type")
    private Integer responsibilityType;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "assign_time")
    private LocalDateTime assignTime;
    @TableField(value = "status")
    private Integer status;
    @TableField(value = "remark")
    private String remark;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "create_time")
    private LocalDateTime createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time")
    private LocalDateTime updateTime;
    @TableField(exist = false)
    private List<Equipment> equipmentList;
    @TableField(exist = false)
    private Equipment equipment;
}
